<?php
/* @var $this ShoeController */
/* @var $model Shoe */

$this->breadcrumbs=array(
	'Shoes'=>array('index'),
	'Create',
);

$this->menu=array(
	array('label'=>'List Shoe', 'url'=>array('index')),
	array('label'=>'Manage Shoe', 'url'=>array('admin')),
);
?>


<div class="content-box">
<div class="content-box-header">
        <h3>新增产品</h3>
        <ul class="content-box-tabs">
          <li><a href="#tab1" class="default-tab">表单</a></li>
        </ul>
        <div class="clear"></div>
 </div>
 <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1">
			<?php $form=$this->beginWidget('CActiveForm', array(
				'id'=>'shoe-form',				
				'enableAjaxValidation'=>false,
				'htmlOptions' => array('enctype' => 'multipart/form-data'),
						
			)); ?>
			
			 <fieldset>
			
				<?php echo $form->errorSummary($model); ?>
				
				
				<div class="row">
					<?php echo $form->labelEx($model,'item_title'); ?>
					<?php echo $form->textField($model,'item_title',array('class' => 'text-input small-input')); ?>
					<?php echo $form->error($model,'item_title'); ?>
				</div>
			
				<div class="row">
					<?php echo $form->labelEx($model,'shoe_suk'); ?>
					<?php echo $form->textField($model,'shoe_suk',array( 'class' => 'text-input small-input')); ?>
					 <br><small>必须填写项目</small>
					<?php echo $form->error($model,'shoe_suk'); ?>
				</div>
			
				<div class="row">
					<?php echo $form->labelEx($model,'item_cover'); ?>
					<?php echo $form->fileField($model,'item_cover',array('class' => 'text-input small-input')); ?>
					<?php echo $form->error($model,'item_cover'); ?>
				</div>
			
				<div class="row">
					<?php echo $form->labelEx($model,'shoe_content'); ?>
					<?php echo $form->fileField($model,'shoe_content',array('class' => 'text-input small-input')); ?>					
					<?php echo $form->error($model,'shoe_content'); ?>
				</div>
				
				<div class="row">
					<?php echo $form->labelEx($model,'item_permissionlv'); ?>
					<?php 
					$list = CHtml::listData(Customergroup::model()->findAll(array('order' => 'ID')), 'ID', 'display_name');				
					echo $form->dropDownList($model,'item_permissionlv',$list);		
					
					?>
		
					<?php echo $form->error($model,'item_permissionlv'); ?>
				</div>
				
				<div class="row">
					<?php echo $form->labelEx($model,'item_password'); ?>
					<?php echo $form->textField($model,'item_password',array('class' => 'text-input small-input')); ?>
					<?php echo $form->error($model,'item_password'); ?>
				</div>
			
				
				<?php echo $form->hiddenField($model,'item_author',array('type'=>"hidden" , 'value'=>"0")); ?>
				<?php echo $form->error($model,'item_author'); ?>
				
				
				<?php echo $form->hiddenField($model,'item_date',array('type'=>"hidden" , 'value'=>date("Y-m-d H:i:s",time()) )); ?>
				<?php echo $form->error($model,'item_date'); ?>
			
				<?php echo $form->hiddenField($model,'item_modified',array('type'=>"hidden" , 'value'=>date("Y-m-d H:i:s",time()) )); ?>
				<?php echo $form->error($model,'item_modified'); ?>
				
			
				<div class="row">
					<?php echo $form->labelEx($model,'item_parent'); ?>
					<?php
					$list = CHtml::listData(Categories::model()->findAll(array('order' => 'id')), 'id', 'name');
					echo $form->dropDownList($model,'item_parent',$list);
					 ?>
					<?php echo $form->error($model,'item_parent'); ?>
				</div>
			
				<div class="row buttons">
					<?php echo CHtml::submitButton($model->isNewRecord ? '增加' : '保存'); ?>
				</div>
			</fieldset>
			<?php $this->endWidget(); ?>
	</div>
</div>
</div>